girlgeniusfandomcom-20200214-history
Forum:DEFAULTSORTing Twitter Forum
I can't figure out how to get DEFAULTSORT to treat '2009' as a whole number, not just '2'. I want the Category to sort by date, as we can't really zero-fill the Twitter status numbers. Help? -- Corgi 17:31, 26 May 2009 (UTC) : Isn't the category sorting by date, though? The index entry is 2, but that seems to be because those categories use initial characters as headings, not initial words. (Just as almost all the headings in http://girlgenius.wikia.com/wiki/Category:Help_desk are filed under F, even those all of those F headings start with "Forum".) But the entries in http://girlgenius.wikia.com/wiki/Category:Othar%27s_Twitter are sorted by date/entry number when I look at them: :2 : * Forum:70450912 (05-19-2007) : * Forum:376333952 (10-30-2007) :2 cont. : * Forum:390637852 (11-05-2007) : * Forum:1764878760 (05-11-2009) : * Forum:1913409663 (05-25-2009) : Or have I missed something? -- Brassica 17:53, 26 May 2009 (UTC) :: Category sorting is alphabetical by ASCII priority order. I wanted it to clump the tweets by year, but it's only picking up the '2' despite how I have it in the DEFAULTSORT entry. -- Corgi 17:55, 26 May 2009 (UTC) :: P.S. With no DEFAULTSORT, it would sort by the word Forum, then the tweet number, which isn't useful because Wikia's reading the number value sort of backwards. In other words, 2 would come after 17906. 00002 would come before 17906. We can't really zero-fill the tweet numbers without being totally confusing to new-topic starters, and having to predict how many digits Twitter will run up to. -- Corgi 18:00, 26 May 2009 (UTC) ::: I'm still missing something, then, because it looks sorted to me. I'm seeing May 2007 before October 2007, before November 2007, before mid-May 2009, before late-May 2009. They're all indexed under "2", but within that, they are sorted by date. -- Brassica 18:49, 26 May 2009 (UTC) :::: I tried adding a space in the defaultsort -- that should work, so that everything is listed by date without a "2" above it. Doesn't seem to be working, though... possibly because of the way the category is added through a template? I'm not sure... -- Danny (talk) 16:17, 27 May 2009 (UTC) If you look at another category, say Category:Agatha's minions, you will see everything grouped into sections by the first letter of the sort. The same thing is happening with the tweet forums, it's just that the first character is '2' (and spaces are ignored most places in wiki code). If you want a different character, you need to add another non-space character to the start of the default sorts. (You could try (non-breaking space) as a hack.) Argadi 17:10, 27 May 2009 (UTC) : I just tested that. It works, sort of, but it then sorts after O and T. -- Brassica 17:29, 27 May 2009 (UTC) ::It shouldn't ignore the space -- check out the Muppet Merchandise category on Muppet Wiki for an example. I'm not sure why it's not working here, but something's odd... -- Danny (talk) 17:59, 27 May 2009 (UTC) :::Oh, y'know what? It's probably because it's in a Defaultsort. It works if you put it into the category tag itself... If it was 2009, 05, 18, then that would work. But the category is in templates, so it's not working on the defaultsorts. -- Danny (talk) 18:01, 27 May 2009 (UTC) :::: I am still amazingly confused, because I was seeing the items in date order. Yes, they were under the index heading of "2", but they were in date order beneath it. Danny/Toughpigs, I think what you did looks better, because it got rid of the "2" heading, but I'm not seeing that it changed the sort at all. Am I hallucinating? -- Brassica 20:19, 27 May 2009 (UTC) ::::: After finally catching up everywhere, I realise I am an idiot. Brassica, they're sorting by date, which is what we needed. We can't sort by tweets because the number of digits changes, and that affects the sort order. -- Corgi 20:47, 27 May 2009 (UTC) ::::::You actually could sort by the tweet number if you wanted, although it would be the same order. The first one is 70450912 (05-19-2007), which is 70,450,912. Then there's 376333952 (10-30-2007), which is 376,333,952. By 2009, it's become 1484808770 (04-09-2009), which is 1,484,808,770. The most recent is 1925721366 (05-26-2009) -- or 1,925,721,366. ::::::Basically, right now, you're seeing this: ::::::* 70450912 ::::::* 376333952 ::::::* 1484808770 ::::::* 1925721366 ::::::And what you should be seeing is this: ::::::* 0070450912 ::::::* 0376333952 ::::::* 1484808770 ::::::* 1925721366 ::::::Does that make sense? -- Danny (talk) 21:09, 27 May 2009 (UTC) ::::::: As I understand the way the sorting would take place, 2 would come after 17906 but 00002 would come before 17906. However, there's no good way to do zero-fills. Am I wrong about this too? /chagrin -- Corgi 21:46, 27 May 2009 (UTC) ::::::::Well, if you wanted to, you could move the page to Forum:0070450912 (05-19-2007). But, like I said, it's already sorting the right way. Sorting by date and sorting by message # gives you the same result. -- Danny (talk) 01:42, 28 May 2009 (UTC) I just did a bit of minioning on some of the pages in this category, because they were sorting into three different areas. Items without a specified sort were sorting by "Forum:", then the number. Items with a specified sort were sorting according to the specified sort: "Category:Othar's Twitter| 2009, 05, 29" - sorts correctly and indexes under a blank, but it requires work. "Category:Othar's Twitter|2009, 06, 01" - again, it sorts correctly, and indexes under '2', but again, it requires work. What we had were three separate lists: one under a blank, one under 2 and one under F. Each sublist was sorting correctly, but they really needed to be merged. Since the default has the sort done by "Forum:(tweet number)", that's where new entries will tend to fall. So I removed the sort information for 10 digit tweet number, and left-padded the shorter numbers with 0 or 00 to bring them to 10 digits. Is it pretty? No. Is it at least internally consistent? Yes. Will it break when the tweet numbers hit 11 digits? Yes. If we don't have a better solution in play, I will do another batch minioning job to get them to sort correctly then. Is there any way to see the code for categories? Can a category be coded to default sort on something other than the immediate name? -- Brassica 00:20, 4 July 2009 (UTC) : It might require a little more work, but let's ensure they sort by date using the piped Category addition. I'd been forgetting to add those when I was fixing some of the other entries, sorry. -- Corgi 00:30, 4 July 2009 (UTC) :: Okay, I removed [Twitter| Forum:########## from the few that had needed the padding on the tweet number sort, and added [Twitter| yyyymmdd to all of them. So they're sorting by date (still), they're all indexing into one group (which was the point of my earlier cleanup today), and that group heading is " " (as you prefer). I prefer the way I had it, since that minimizes the need for ongoing maintenance (substituting instead occasional batch cleanup - as when the tweet numbers roll over to 11 digits), but if you want to chase around after each new entry, adding the code so it'll index under " ", I'm fine with that too. -- Brassica 01:55, 4 July 2009 (UTC) :: Corgi, you entered the date for today's tweet as 2009, 07, 04, with no initial space. So the entry for today is indexing under 2, where the ones I did are indexing under " ". Are you okay with that? -- Brassica 21:33, 4 July 2009 (UTC) ::: Ah - sorry, lack of attention on my part, thank you for the correction. I wish they'd just sort as '2009' instead, but we ain't gonna get that. -- Corgi 06:45, 5 July 2009 (UTC) :::: I have corrected nothing. I just pointed out that already, there is an inconsistency. I understand that forcing a sort by date is important to you. My one suggestion is that you edit the template to tell people that they need to enter the category code, and to tell them HOW to enter the date. Because that may help minimize the amount of cleanup that you have to do. (Actually, it would be great if the template could preload that information, but a reminder would be better than nothing.) -- Brassica 11:54, 5 July 2009 (UTC)